package com.app.module.camera.utils

import android.os.Environment
import java.text.SimpleDateFormat
import java.util.*

class FileUtils {

    companion object{
         fun getPath(isPhoto: Boolean):String?{
            val dataDirectory = Environment.getExternalStorageDirectory()
            val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
            return if (isPhoto) {
                "${dataDirectory.path}/IMG_$timestamp.jpeg"
            } else {
                "${dataDirectory.path}/VID_$timestamp.mp4"
            }
        }
    }
}
